$.ajax({
    url: 'http://127.0.0.1:8086/music',
    type: 'GET',
    dataType: 'json',
    success: function (data) {
        var chartData = [];
        for (var key in data.data) {
            chartData.push({
                name: key,
                value: data.data[key]
            });
        }
        var myChart = echarts.init(document.getElementById('ec06_pie_findSong'));
        myChart.setOption({
            tooltip: {
                trigger: 'item'
            },
            legend: {
                textStyle: {
                    fontSize: 8,
                    color: '#fff' // 修改字体颜色
                }
            },
            series: [{
                type: 'pie',
                radius: ['0%', '65%'],
                center: ['50%', '50%'],
                roseType: 'area',
                color: ['#99ccff'],
                itemStyle: {
                    borderRadius: 5
                },
                labelLine: {
                    lineStyle: {
                        color: 'rgba(255, 255, 255, 1)'
                    },
                    smooth: 0.2,
                    length: 10,
                    length2: 20
                },
                itemStyle: {
                    shadowBlur: 200,         
                },
                data: chartData
            }]
        });
    }
});